package com.serkol.ams.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName app_browser
 */
@TableName(value ="app_browser")
@Data
public class AppBrowser implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private String vhostName;

    /**
     * 
     */
    private String vserial;

    /**
     * 
     */
    private String vuuid;

    /**
     * 
     */
    private String vversion;

    /**
     * 
     */
    private String vhash;

    /**
     * 
     */
    private String vhardware;

    /**
     * 
     */
    private Integer status;

    /**
     * 
     */
    private Date createDate;

    /**
     * 
     */
    private Date updateDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AppBrowser other = (AppBrowser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getVhostName() == null ? other.getVhostName() == null : this.getVhostName().equals(other.getVhostName()))
            && (this.getVserial() == null ? other.getVserial() == null : this.getVserial().equals(other.getVserial()))
            && (this.getVuuid() == null ? other.getVuuid() == null : this.getVuuid().equals(other.getVuuid()))
            && (this.getVversion() == null ? other.getVversion() == null : this.getVversion().equals(other.getVversion()))
            && (this.getVhash() == null ? other.getVhash() == null : this.getVhash().equals(other.getVhash()))
            && (this.getVhardware() == null ? other.getVhardware() == null : this.getVhardware().equals(other.getVhardware()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getVhostName() == null) ? 0 : getVhostName().hashCode());
        result = prime * result + ((getVserial() == null) ? 0 : getVserial().hashCode());
        result = prime * result + ((getVuuid() == null) ? 0 : getVuuid().hashCode());
        result = prime * result + ((getVversion() == null) ? 0 : getVversion().hashCode());
        result = prime * result + ((getVhash() == null) ? 0 : getVhash().hashCode());
        result = prime * result + ((getVhardware() == null) ? 0 : getVhardware().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", vhostName=").append(vhostName);
        sb.append(", vserial=").append(vserial);
        sb.append(", vuuid=").append(vuuid);
        sb.append(", vversion=").append(vversion);
        sb.append(", vhash=").append(vhash);
        sb.append(", vhardware=").append(vhardware);
        sb.append(", status=").append(status);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}